/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package server;

import java.net.MalformedURLException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author apple
 */
public class Server {
    private static final String url="rmi://127.0.0.1:" + 8001;
    private static final String MARKET="";
    /**
     * @param args the command line arguments
     */
    public Server(String marketName) {
        try {
            Market marketobj = new MarketImpl(marketName);
            LocateRegistry.createRegistry(8001);
            java.rmi.Naming.rebind(marketName, marketobj);
            System.out.println(marketobj + "is ready");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    public static void main(String[] args) {
        
    }
    
}
